

delete __dirname
delete __filename

top = self = window = global
window.addEventListener = function () {
}
window.webkitRequestFileSystem=function(){}
window.hammerhead=''
window.DOMParser=function (){}
window.window.DOMParser=function (){}
window.localStorage={
    "$_f1": "xHmPkPNeqQKhB_YVqmPg7L.qww3",
    "$_ff": "z_4UiVqVOg0rMmBzZobY3YYXfrfd8PE9Y7NjJgciEuGSy_eR4RAFOL1eboeNqYkY",
    "$_f0": "A.1d3ewqVrAuTPusw56MQqA7oel",
    "$_fh1": "abJRX5qGt_GW5Q3sOLAzug9aM7Q",
    "__#classType": "localStorage",
    "$_nd": "236077",
    "$_cDro": "WOW",
    "$_YWTU": "bY228WCA9YDipQH_.DgSS16S0y_WBnazESjb5Vqdthl"
}
window.indexedDB={}
window.webkitRequestFileSystem=function (){}
window.sessionStorage={
    "$_cDro": "WOW",
    "$_YWTU": "bY228WCA9YDipQH_.DgSS16S0y_WBnazESjb5Vqdthl"
}
window.name='$_YWTU=bY228WCA9YDipQH_.DgSS16S0y_WBnazESjb5Vqdthl&$_cDro=WOW&vdFm='
window.localStorage={
    "$_f1": "xHmPkPNeqQKhB_YVqmPg7L.qww3",
    "$_ff": "z_4UiVqVOg0rMmBzZobY3YYXfrfd8PE9Y7NjJgciEuGSy_eR4RAFOL1eboeNqYkY",
    "$_f0": "A.1d3ewqVrAuTPusw56MQqA7oel",
    "$_fh1": "abJRX5qGt_GW5Q3sOLAzug9aM7Q",
    "__#classType": "localStorage",
    "$_nd": "236077",
    "$_cDro": "WOW",
    "$_YWTU": "bY228WCA9YDipQH_.DgSS16S0y_WBnazESjb5Vqdthl"
}
window.XMLHttpRequest = function (){}
window.clientInformation={}
delete global
delete Buffer

meta = {
    0: {
        /* "http-equiv":"Content-Type",
         "content":"text/html; charset=utf-8",*/
    },
    1: {
        "content": content,
        parentNode: {
            removeChild() {
            }
        }
    },
    length: 2
}
document = {
    exitFullscreen:{

    },
    cookie:'',
    createElement(ele) {
        console.log("document createElement:", ele)
        if (ele === "div") {
            return {
                getElementsByTagName: function () {
                    return []
                }
            }
        }

    },
    getElementsByTagName(ele) {
        console.log("document getElementsByTagName:", ele)
        if (ele === "meta") {
            return meta
        }else if(ele==="base"){
            return []
        }else if(ele==="script"){
            return []
        }

    },
    getElementById() {
    },
    addEventListener: function () {
    },
    documentElement: {
        addEventListener: function () {
        }
    }

}
location = {
    "ancestorOrigins": {},
    "href": "https://sugh.szu.edu.cn/Html/News/Columns/7/Index.html",
    "origin": "https://sugh.szu.edu.cn",
    "protocol": "https:",
    "host": "sugh.szu.edu.cn",
    "hostname": "sugh.szu.edu.cn",
    "port": "",
    "pathname": "/Html/News/Columns/7/Index.html",
    "search": "",
    "hash": ""
}
navigator = {
    "platform":"Win32",
    "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
}
history = {}
screen = {}

setInterval =function (){}
setTimeout =function (){}

function getEnv(proxy_array) {
    for (var i = 0; i < proxy_array.length; i++) {
        handler = `{\n
            get: function(target, property, receiver) {\n
                   console.log('方法：get','    对象：${proxy_array[i]}','    属性：',property,'    属性类型：',typeof property,'    属性值类型：',typeof target[property]);
                   return target[property];
            },
            set: function(target, property, value, receiver){\n
                    console.log('方法：set','    对象：${proxy_array[i]}','    属性：',property,'    属性类型：',typeof property,'    属性值类型：',typeof target[property]);
                    return Reflect.set(...arguments);
            }
        }`
        eval(`
            try {
                ${proxy_array[i]};
                ${proxy_array[i]} = new Proxy(${proxy_array[i]}, ${handler});
            } catch (e) {
                ${proxy_array[i]} = {};
                ${proxy_array[i]} = new Proxy(${proxy_array[i]}, ${handler});
            }
        `)
    }
}

proxy_array = ['window', 'document', 'location', 'navigator', 'history', 'screen', 'div']
getEnv(proxy_array)


